"""
The getuservar module contains the function call to return a SPICE variable value
"""

from _spice_path import spice_path

def _getuservar(spiceref, var_name):
    searchvi=spiceref.GetVIReference(spice_path + '\\common\\commands\\GetSPICEVariable.vi')
    parnames='Name','Value','found','error out'
    parvalues=var_name,0,0,0
    searchnames,searchvalues=searchvi.Call(parnames,parvalues)
    varvalue=searchvalues[1]
    return varvalue
